package com.zhoug.zmui3demo.ui;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;

import com.zhoug.zmui3demo.R;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

/**
 * @Author: zhoug
 * @Date: 2024-07-08
 * @Description:
 */
public class ZMUIInputViewMainActivity extends AppCompatActivity {

    private Button btnTextView;
    private Button btnEditTextView;
    private Button btnInputCheckView;
    private Button btnAll;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_input_view_main);
        findViews();
        btnTextView.setOnClickListener(v->{
            toActivity(ZMUIInputTextViewActivity.class);
        });
        btnEditTextView.setOnClickListener(v->{
            toActivity(ZMUIInputEditTextViewActivity.class);
        });
        btnAll.setOnClickListener(v->{
            toActivity(ZMUIInputAllActivity.class);
        });
        btnInputCheckView.setOnClickListener(v->{
            toActivity(ZMUIInputCheckViewActivity.class);
        });

    }

    private void toActivity(Class<? extends Activity> clz){
        Intent intent=new Intent(this,clz);
        startActivity(intent);
    }

    private void findViews() {
        btnTextView = findViewById(R.id.btn_textView);
        btnEditTextView = findViewById(R.id.btn_editTextView);
        btnInputCheckView = findViewById(R.id.btn_inputCheckView);
        btnAll = findViewById(R.id.btn_all);
    }
}
